<style>
.bidthe{color: #fff;
    left: 0px;
    position: absolute;
}
.bidthe dd {
    background-color: #980000;
    border-radius: 0 0 5px 5px;
    float: left;
    font-size: 11px;
    margin: 0 0px 0 5px;
    padding: 1px 5px;
}
.bidthe dd.aone{background-color: #d23030;} 
.bidthe dd.spec{background-color: #d23030;}
.bidthe dd.meet{background-color: #d23030;}

.bidthe dd.ing{background-color: #d23030;} 
.bidthe dd.fut{background-color: #d23030;}
.bidthe dd.end{background-color: #d23030;}

.bidthe dd.pm{background-color: #d23030;}
.bidthe dd.jb{background-color: #d23030;}
.slide .p-extra {
	position:absolute;
	bottom:0;
	width:100%;
	height:25px;
	line-height:25px;
	color:#fff
}
.slide .p-extra .p-state {
	float:left;
	width:67px;
	text-align:center
}
.slide .p-extra .p-state1 {
	background:#f15353
}
.slide .p-extra .p-state2 {
	background:#e37b12
}
.slide .p-extra .p-state3 {
	background:#999
}
.slide .p-extra .p-time {
	margin-left:67px;
	padding:0 10px;
	background:rgba(0,0,0,.6)
}
.slide .p-extra .p-time-fixed {
	position:fixed;
	top:0;
	left:0;
	margin:0;
	z-index:10;
	width:100%;
	height:35px;
	line-height:35px;
	text-align:center
}
.dp-num .dp-people {
	float:left;
	width:75%;
	font-size:0.65rem;
	color:#999
}
.dp-num .dp-p-num {
	padding-bottom:6px
}
.dp-num .dp-p-num i {
	font-size:0.8rem;
	color:#f15353
}
.dp-num .dp-p-info i {
	color:#f15353
}
</style>
<div class="fui-page fui-page-current page-goods-list">
<div class="fui-content navbar" style="top:0">
<div id="carousel-container" class="carousel slide" data-role="carousel" data-param-auto="true" ng-if="pagedata.special.sbanner.length>0">
	<div class="carousel-inner" role="listbox">
		<div ng-repeat="nav in pagedata.special.sbanner" ng-class="{'item':1, 'active':$index==0}" >
			<a href="{{nav.url}}">
				<img ng-src="{{tomedia(nav) || '../core/resource/images/banner-1.jpg'}}" style="display: block; width: 100%; height: 100%;">
			</a>
		</div>
	</div>
	<style>
            .fui-swipe-page .fui-swipe-bullet {background: {background}; opacity: {opacity};}
            .fui-swipe-page .fui-swipe-bullet.active {opacity: 1;}
    </style>
	<div class="p-extra" ng-if="pagedata.special.status ==1">
			<div class="p-state p-state1">拍卖中</div>
			<div class="p-time specialuptime" ng-init="tool.time_down(pagedata.special.rest_time)">距离结束：<span class="day">{{pagedata.special.rest_time.day || '-'}}</span><span class="dw">天</span><span class="hour">{{pagedata.special.rest_time.hour|| '-'}}</span><span class="dw">时</span><span class="minute">{{pagedata.special.rest_time.minute|| '-'}}</span><span class="dw">分</span><span class="second">{{pagedata.special.rest_time.second|| '-'}}</span><span class="dw">秒</span></div>
	</div>
	<div class="p-extra" ng-if="pagedata.special.status ==0">
			<div class="p-state p-state1">未开始</div>
			<div class="p-time">开始时间：<span>{{pagedata.special.starttime2}}</span></div>
	</div>
	<div class="p-extra" ng-if="pagedata.special.status ==2">
			<div class="p-state p-state1">已结束</div>
			<div class="p-time">结束时间：<span>{{pagedata.special.endtime2}}</span></div>
	</div>
</div>
<div ng-if="pagedata.special" class="fui-cell-group fui-detail-group">
    <div class="fui-cell">
		<div class="fui-cell-tag">
			<i class="fui-tag fui-tag-red">竞价</i>
		</div>
        <div class="fui-cell-text name bold" style="">
			 {{pagedata.special.title}}
        </div>
    </div>
	<div class="fui-cell" style="border-bottom:1px solid #d7d7d7;margin:0 0.5rem;padding:0">
		<div class="fui-cell-text dp-num">
                <div class="dp-people">
                    <div class="dp-p-num">
                        送拍结构：<em>{{pagedata.special.merchname || '平台自营'}}</em>
                    </div>
                    <div class="dp-p-info">
                        <i id="ensureNum">{{pagedata.special.scount || 0}}</i>人报名 | <i id="accessNum">{{pagedata.goodsnum || 0}}</i>件拍品
                    </div>
                </div>
         </div>
		<div class="fui-cell-remark lover noremark" style="margin-bottom:1rem">
			<div style="color:#f60;margin-bottom:0.2rem;text-align:center">
				<i href="javascript:;" ng-click="post({},'tx')" class="icon icon-task-management"></i>
			</div>
			<div style="color:#f60">
				<span>{{pagedata.ustx !=1?'设置提醒':'已设置'}}</span>
			</div>
        </div>
    </div>
 </div>
<div ng-if="pagedata.goods.length>0" class="fui-goods-group block border">
			<div ng-repeat="item in pagedata.goods" class="fui-goods-item">
				<a ng-click="access_json('/detail//id='+item.id)">
					<dl class="bidthe">
                             <!--拍卖类型-->
							<dd ng-show="item.status == 0" class="pm goodsuptime{{item.id}}">距离开拍：<span class="day">{{pagedata.special.rest_time.day || '-'}}</span><span class="dw">天</span><span class="hour">{{pagedata.special.rest_time.hour || '-'}}</span><span class="dw">时</span><span class="minute">{{pagedata.special.rest_time.minute || '-'}}</span><span class="dw">分</span><span class="second">{{pagedata.special.rest_time.second || '-'}}</span><span class="dw">秒</span></dd>
                            <dd ng-show="item.status == 1" class="jb goodsuptime{{item.id}}">距离结束：<span class="day">{{pagedata.special.rest_time.day || '-'}}</span><span class="dw">天</span><span class="hour">{{pagedata.special.rest_time.hour || '-'}}</span><span class="dw">时</span><span class="minute">{{pagedata.special.rest_time.minute || '-'}}</span><span class="dw">分</span><span class="second">{{pagedata.special.rest_time.second || '-'}}</span><span class="dw">秒</span></dd>
                            <dd ng-show="item.status == 2" class="spec">已经结束</dd>
                             <!--拍卖类型-->
                    </dl>
					<div class="image" style="background-image: url('{{tomedia(item.image) ||'../core/resource/images/nopic.jpg'}}')">
						<div ng-show="item.total <=0" class="salez" style="background-image: url('{{tomedia(pagedata.shopset.shop.saleout)}}'); "></div>
					</div>
				</a>
				<div class="detail">
					<a href="javascript:;" ng-click="access_json(item.active.url || '/detail//id='+item.id)">
						<div class="name">
							<i class="fui-tag fui-tag-danger">竞价</i>
							{{item.pname}}
						</div>
					</a>
					<div class="price" style="margin-top: 0.3rem" href="javascript:;" ng-click="access_json('jy_jdpm/detail//id='+item.id)">
						<span class="text">￥ {{item.nowprice >0 ? item.nowprice : item.onset}}
						</span>
						<span class="text subtitle r">
							{{item.bidcount || '0'}}次出价
						</span>
					</div>
				</div>
			</div>
	</div>
</div>
<div ng-include="sys_html('common/_menu')"></div>
</div>
<script>
for (var i = 1; i < 100; i++){
  window.clearInterval(i);
}
scope.loading = true;  //状态标记
function getMyDate(now) {
        var testDate = new Date(parseInt(now) * 1000);//必须为整数型的毫秒数
        return testDate.format("yyyy-MM-dd hh:mm:ss");
}

    /**
     * 将数值四舍五入(保留2位小数)后格式化成金额形式
     * @param num 数值(Number或者String)
     * @return 金额格式的字符串,如'1,234,567.45'
     * @type String
     */
    function formatCurrency(num) {
        num = num.toString().replace(/\$|\,/g, '');
        if (isNaN(num))
            num = "0";
        sign = (num == (num = Math.abs(num)));
        num = Math.floor(num * 100 + 0.50000000001);
        cents = num % 100;
        num = Math.floor(num / 100).toString();
        if (cents < 10)
            cents = "0" + cents;
        for (var i = 0; i < Math.floor((num.length - (1 + i)) / 3); i++)
            num = num.substring(0, num.length - (4 * i + 3)) + ',' +
                num.substring(num.length - (4 * i + 3));
        return (((sign) ? '' : '-') + num + '.' + cents);
    }

</script>